package com.cls.business.mapper;

import com.cls.business.entity.AllotmentCapital;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cls.system.entity.Expert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 拨付资金表 Mapper
 *
 * @author slx
 * @date 2020-11-20 09:33:12
 */
@Repository
public interface AllotmentCapitalMapper extends BaseMapper<AllotmentCapital> {

    List<AllotmentCapital> findAllotmentCapitalsPage(@Param("allotmentCapital")AllotmentCapital allotmentCapital);

    List<AllotmentCapital> findAllotmentCapitalsByDeclareId(@Param("declareId")Long declareId);
    AllotmentCapital selectDetailById(@Param("allotmentCapitalId")Long allotmentCapitalId);

    @Select("select * from biz_allotment_capital where declare_id=#{declareId} and is_delete=0 order by allotment_time desc limit 1")
    AllotmentCapital findNewsLog(@Param("declareId")Long declareId);
}
